<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 大括号内部可以放入任意的 JavaScript 表达式，可以进行运算，以及引用对象属性。
        let x = 1;
        let y = 2;

        `${x} + ${y} = ${x + y}`
            // "1 + 2 = 3"

        `${x} + ${y * 2} = ${x + y * 2}`
        // "1 + 4 = 5"

        let obj = { x: 1, y: 2 };
        `${obj.x + obj.y}`
        // "3"
    </script>
</body>

</html>